# -*- coding =utf-8 -*-
# @Time : 2023/11/27 17:21
# @Author : 梁益铭
# @File : test.py
# @Software : PyCharm
import torch
# from torch_geometric.loader import DataLoader
import os

print(torch.cuda.device_count())  # 有几个可用的gpu

print(torch.cuda.get_device_capability(device=None), torch.cuda.get_device_name(device=None))  # 可用gpu内存大小，可用gpu的名字
print(torch.__version__)
print(torch.version.cuda)
print(torch.cuda.is_available())

x = torch.tensor([1, 2, 3])
print(x.device)
x = x.cuda()
print(x.device)
